import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible/index.min.js'
import 'bulma/css/bulma.min.css'
import Vant, { Lazyload, Divider, Sticky, Sku, Pagination, Area, Toast, Popup, ActionSheet, CouponCell, CouponList } from 'vant'
import 'vant/lib/index.css'
Vue.use(CouponCell)
Vue.use(CouponList)
Vue.use(ActionSheet)
Vue.use(Popup)
Vue.use(Toast)
Vue.use(Area)
Vue.use(Pagination)
Vue.use(Sku)
Vue.use(Sticky)
Vue.use(Divider)
Vue.use(Vant)
Vue.use(Lazyload)
Vue.config.productionTip = false
Toast.setDefaultOptions({ duration: 1000 })
Vue.filter('saleNum', value => {
  if (value >= 10000) {
    value = (Number(value) / 10000).toFixed(1)
  }
  return value
})
new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
